{% extends "base.html" %}

{% block content %}
<div class="span16">
  <ul class="tabs" data-tabs="tabs">
    <li class="active"><a href="#profile">Profile</a></li>
    <li class=""><a href="#uploads">Uploads</a></li>
    <li class=""><a href="#favorites">Favorites</a></li>
    <li class=""><a href="#collections">Collections</a></li>
    <li><a href="#settings">Settings</a></li>
  </ul>
  
  <div id="my-tab-content" class="tab-content">
    <div class="tab-pane active" id="profile">
      <div class="row">
        <div class="span3">
          {% if profile.avatar%}
            <img class="avatar" src="{{ profile.avatar.url_150x150 }}" />
          {% endif %}
        </div>
        <div class="span3">
          <ul>
            <li class="name"><a href="/profiles/{{ profile.user.id }}">{{ profile.user.username }}</a></li>
            <li class="title">{{ profile.signature }}</li>
            <li class="asset_count">{{ profile.nr_of_assets }}</li>
          </ul>
        </div>
        <div class="span5">
          <h5>Tag cloud:</h5>
          {% for tag in profile.tag_cloud %}
            {% include "snippets/tag.html" with tag=tag profile=profile only %}
          {% endfor %}
        </div>
      </div>
      <div class="row">
        <div class="span16">
          <h5>Top 3:</h5>
           {% for asset in profile.topassets %}
              {% include "snippets/smallpreview.html" with asset=asset only %}
           {% endfor %}
           <div><a href="/search?user={{ profile.user.username }}" >More...</a></div>
        </div>
      </div>
    </div>
    <div class="tab-pane" id="uploads">
      {% for file in profile.recentuploads %}
        <div>{{ file.stamp|date:"SHORT_DATE_FORMAT" }} <a class="file" href="/files/{{ file.id }}/">{{ file.file_name }}</a></div>
      {% empty %}
        No uploads
      {% endfor%}
    </div>
    <div class="tab-pane" id="favorites">
      {% for asset in favorites.all %}
        {% include "snippets/smallpreview.html" with asset=asset only %}
      {% empty %}
        No favorites
      {% endfor%}
    </div>
    <div class="tab-pane" id="collections">
    </div>
    <div class="tab-pane" id="settings">
    </div>

  </div>
</div>

{% endblock %}
